﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Acme.BookStore.Car
{
    public class CreateUpdateVehicleDto
    {
        [Required(ErrorMessage = "车号不能为空")]
        public string VehicleNumber { get; set; }

        [Required(ErrorMessage = "车型不能为空")]
        public string VehicleModel { get; set; }

        [Required]
        [Range(0, int.MaxValue, ErrorMessage = "最大体积必须大于0")]
        public int MaximumVolume { get; set; }

        [Required]
        [Range(0, double.MaxValue, ErrorMessage = "载重必须大于0")]
        public decimal LoadCapacity { get; set; }

        [Required]
        [Range(0, int.MaxValue, ErrorMessage = "载人数必须大于0")]
        public int Passengers { get; set; }

        [Required(ErrorMessage = "准驾驾照不能为空")]
        public string Qualified { get; set; }

        [Required(ErrorMessage = "姓名不能为空")]
        public string VehicleName { get; set; }

        [Required(ErrorMessage = "电话不能为空")]
        [Phone(ErrorMessage = "请输入有效的电话号码")]
        public string Phone { get; set; }

        public string DefaultDriver { get; set; }

        [Required(ErrorMessage = "车牌号不能为空")]
        public string LicenseNumber { get; set; }

        public string Region { get; set; }
    }
}
